<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/11
 * Time: 18:07
 */
namespace app\common\validate;

use think\Validate;

class ShopCartValidate extends Validate
{

    protected $rule =   [
        'goods_id'  => 'require|max:25|number',
        'vip'   => 'require|number',
        'userid' => 'require|number',
        'authKey' => 'require',
        'shop_id' => 'require',
        'cart_id' => 'require',

    ];

    protected $message  =   [
        'goods_id.require' => 'goods_id为空',
        'vip.require'     => 'vip等级为空',
        'userid.require'   => 'userid为空',
        'authKey.require'   => 'authKey为空',
        'shop_id.require'   => 'shop_id为空',
        'cart_id.require'   => 'cart_id为空',
    ];

    protected $scene = [
        'shopCartList'  =>  ['userid','authKey'],
        'addShopCart'  =>  ['shop_id','vip','userid','authKey','goods_id'],
        'jiaCount'  =>  ['cart_id','authKey'],
        'jianCount'  =>  ['cart_id','authKey'],
        'cartDel'  =>  ['cart_id','authKey'],
        'jieshuanCart'  =>  ['cart_id','authKey','userid'],

    ];




}